﻿using BaseTool;
using BaseWindow.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BaseWindow.BLL
{
    public class _4GBLL
    {
        private ConfigHelper configHelper = new ConfigHelper();
        public SettingModel LoadConfig(string name)
        {
            try
            {
                SettingModel set = new SettingModel();
                Dictionary<string, string> dic = configHelper.ReadAll();
                
                if (dic.ContainsKey(name))
                {
                    set.Types = dic[name].Split(';');
                }
                
                return set;
            }
            catch (Exception ee)
            {
                LogHelper.WriteError("读取配置文件失败",ee);
                return null;
            }
        }
    }
}
